import json


input_feature_path = "/home/ljw22/workspace/qwen/result/法律要件抽取/72B/feature.json"
output_feature_path = "/home/ljw22/workspace/qwen/MUSER-main/data/features/72B_feature.json"

feature_dict = {}

with open(input_feature_path) as fin:
    for line in fin:
        line = line.strip()
        line_dict = json.loads(line)
        feature_dict[line_dict['index']] = line_dict['feature']

with open(output_feature_path, 'w') as fout:
    json.dump(feature_dict, fout, ensure_ascii=False, indent=4)


